package com.wc.alorithm_luogu._二分.P1046;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/19 13:13
 * @description
 * https://www.luogu.com.cn/problem/P1046
 * 陶陶摘苹果
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 是个苹果的高度
        int[] heights = new int[10];
        int n = 10;
        while (n-->0){
            heights[n] = sc.nextInt();
        }
        Arrays.sort(heights);
        int height = sc.nextInt() + 30;

        // 顺序查找（可以优化为二分查找）
        for (int i = 0; i < 10; i++) {
            if (height<heights[i]){
                System.out.println(i);
                break;
            }
        }
    }
}
